package com.wing.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.order.model.entity.CabInventoryProduct;
import com.wing.order.model.request.CabInventoryProductForm;
import com.wing.order.model.response.CabInventoryProductVO;

import java.util.List;
import java.util.Map;

/**
 * 产品库存-Service
 *
 * @author
 */
public interface CabInventoryProductService extends IService<CabInventoryProduct> {

    /**
     * 添加
     *
     * @param cabInventoryProductForm
     * @return
     */
    int add(CabInventoryProductForm cabInventoryProductForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CabInventoryProductVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CabInventoryProductVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CabInventoryProductVO get4appById(Long id);

    CabInventoryProduct getInventoryProductVOBySkuCode(String skuCode,Long warehouseId,Integer sourceType);

    List<CabInventoryProduct> getInventoryProductByType();

    List<Object> getCabInventoryProductBySkuCodeAndType(String skuCode);

    /**
     * 添加（简版）
     * @param cabInventoryProductForm
     * @return
     */
    int saveCabInventoryProduct(CabInventoryProductForm cabInventoryProductForm);
}
